<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:set var="nature_value" scope="page">
	<x:out
		select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
</c:set>
<c:set var="status" scope="page">
	<x:out select="$xmlData/data/proposal/status" />
</c:set>
<c:set var="grant_code" scope="page">
	<x:out select="$xmlData/data/proposal/grant_code" />
</c:set>
<c:set var="sub_grant_code" scope="page">
	<x:out select="$xmlData/data/proposal/sub_grant_code" />
</c:set>
<input id='pass_files' name="proposal/pass_files" type='hidden'
	value='<x:out select="$xmlData/data/proposal/pass_files" />'>
	
	
<div class="t_bar">
	<span class="color_red">*</span>${param.title1}
</div>
<table  id="tabaccessory" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;" >
			
			<thead >
				<tr>
					<th width="10%">选择</th>
					<th width="10%">序号</th>
					<!-- <th width="30%">附件类型</th> -->
					<th width="40%">附件名称</th>
					<th width="40%">备注</th>
		</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none"  align="center">
						<td align="center">
							<input type="radio" class="radiobutton" name="sel_main_psn1"  >
						</td>
						<td align="center">
							<span name="accessory|list1[0]@seq_no" >[index]</span> 
						</td>
						<!-- <td align="center">
							<input type="text" id="accessory_type[0]" name="accessory|list1[0]|accessory_type_name" label="附件类型"   style="width:80%" class="required"/>
						</td> -->
						<td align="center">						
			          		<input id="accessory_designation[0]" name="accessory|list1[0]|accessory_designation_name" maxlength="100" class=" required" label="附件名称"  style="width:80%"/>
						</td>
						<td align="center">
							<input type="text" id="remark[0]" name="accessory|list1[0]|remark_name" label="备注" maxlength="100" style="width:80%" class="required"/>
						</td>
						
					</tr>
					 <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/accessory/list1" var="list1">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>
							<input type="radio" class="radiobutton" name="sel_main_psn1"  >
						</td>
						<td align="center">
							<span  name="accessory/list1[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<%-- <td align="center">
						   <input type="text" id="accessory_type[${flag}${index}]" name="accessory/list1[${flag}${index}]/accessory_type_name"  label="附件类型"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list1/accessory_type_name" />"/>
						</td> --%>
						<td align="center">
						   <input type="text" id="accessory_designation[${flag}${index}]" name="accessory/list1[${flag}${index}]/accessory_designation_name"   label="附件名称"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list1/accessory_designation_name" />"/>
						</td>
						<td align="center">
						 <input type="text" id="remark[${flag}${index}]" name="accessory/list1[${flag}${index}]/remark_name"   label="备注"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list1/remark_name" />"/>
						</td>
						
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
				<script type="text/javascript">
						showAllDateTag("tabaccessory");
				</script> 
				</table>
					
				<table width="98%" align="center">
					<tr><td>
					<input class="button"  name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tabaccessory',${param.number1},'${param.title1}最多${param.number1}条')){addNewRow('tabaccessory');showDateTag('tabaccessory');}try{top.resizeFrame();}catch(e){};">
					<input class="button"  name="cmdMovePrev" type=button value="上移" onclick="movePrev('tabaccessory','sel_main_psn1')">
					<input class="button"  name="cmdMoveNext" type=button value="下移" onclick="moveNext('tabaccessory','sel_main_psn1')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tabaccessory','${param.title1} ');countTableInt('tabaccessory','sci1_total','11');countTableInt('tabaccessory','others1_total','12');">
					</td></tr>
</table> 

<br/>
<div class="t_bar">
	<span class="color_red">*</span>${param.title2}
</div>
<table  id="tabaccessory1" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;" >
			
			<thead >
				<tr>
					<th width="10%">选择</th>
					<th width="10%">序号</th>
					<!-- <th width="30%">附件类型</th> -->
					<th width="40%">附件名称</th>
					<th width="40%">备注</th>
		</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none"  align="center">
						<td align="center">
							<input type="radio" class="radiobutton" name="sel_main_psn2"  >
						</td>
						<td align="center">
							<span name="accessory|list2[0]@seq_no" >[index]</span> 
						</td>
						<!-- <td align="center">
							<input type="text" id="accessory_type[0]" name="accessory|list2[0]|accessory_type_name" label="附件类型"   style="width:80%" class="required"/>
						</td> -->
						<td align="center">						
			          		<input id="accessory_designation[0]" name="accessory|list2[0]|accessory_designation_name" maxlength="100"  class=" required" label="附件名称"  style="width:80%"/>
						</td>
						<td align="center">
							<input type="text" id="remark[0]" name="accessory|list2[0]|remark_name" maxlength="100" label="备注"  style="width:80%" class="required"/>
						</td>
						
					</tr>
					 <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/accessory/list2" var="list2">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>
							<input type="radio" class="radiobutton" name="sel_main_psn2"  >
						</td>
						<td align="center">
							<span name="accessory/list2[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<%-- <td align="center">
						   <input type="text" id="accessory_type[${flag}${index}]" name="accessory/list2[${flag}${index}]/accessory_type_name"  label="附件类型"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list2/accessory_type_name" />"/>
						</td> --%>
						<td align="center">
						   <input type="text" id="accessory_designation[${flag}${index}]" name="accessory/list2[${flag}${index}]/accessory_designation_name"   label="附件名称"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list2/accessory_designation_name" />"/>
						</td>
						<td align="center">
						 <input type="text" id="remark[${flag}${index}]" name="accessory/list2[${flag}${index}]/remark_name"   label="备注"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list2/remark_name" />"/>
						</td>
						
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
				<script type="text/javascript">
						showAllDateTag("tabaccessory1");
				</script> 
				</table>
				<table width="98%" align="center">
					<tr><td>
					<input class="button"  name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tabaccessory1',${param.number2},'${param.title2}最多${param.number2}条')){addNewRow('tabaccessory1');showDateTag('tabaccessory1');}try{top.resizeFrame();}catch(e){};">
					<input class="button"  name="cmdMovePrev" type=button value="上移" onclick="movePrev('tabaccessory1','sel_main_psn2')">
					<input class="button"  name="cmdMoveNext" type=button value="下移" onclick="moveNext('tabaccessory1','sel_main_psn2')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tabaccessory1','${param.title2} ');countTableInt('tabaccessory1','sci1_total','11');countTableInt('tabaccessory1','others1_total','12');">
					</td></tr>
</table> 

<br/>
<div class="t_bar">
	<span class="color_red">*</span>${param.title3}
</div>
<table  id="tabaccessory2" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;" >
			
			<thead >
				<tr>
					<th width="10%">选择</th>
					<th width="10%">序号</th>
					<!-- <th width="30%">附件类型</th> -->
					<th width="40%">附件名称</th>
					<th width="40%">备注</th>
		</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none"  align="center">
						<td align="center">
							<input type="radio" class="radiobutton" name="sel_main_psn3"  >
						</td>
						<td align="center">
							<span name="accessory|list3[0]@seq_no" >[index]</span> 
						</td>
						<!-- <td align="center">
							<input type="text" id="accessory_type[0]" name="accessory|list3[0]|accessory_type_name" label="附件类型"   style="width:80%" class="required"/>
						</td> -->
						<td align="center">						
			          		<input id="accessory_designation[0]" name="accessory|list3[0]|accessory_designation_name" maxlength="100" class=" required" label="附件名称"  style="width:80%"/>
						</td>
						<td align="center">
							<input type="text" id="remark[0]" name="accessory|list3[0]|remark_name" label="备注" maxlength="100" style="width:80%" class="required"/>
						</td>
						
					</tr>
					 <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/accessory/list3" var="list3">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>
							<input type="radio" class="radiobutton" name="sel_main_psn3"  >
						</td>
						<td align="center">
							<span   name="accessory/list3[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<%-- <td align="center">
						   <input type="text" id="accessory_type[${flag}${index}]" name="accessory/list3[${flag}${index}]/accessory_type_name"  label="附件类型"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list3/accessory_type_name" />"/>
						</td> --%>
						<td align="center">
						   <input type="text" id="accessory_designation[${flag}${index}]" name="accessory/list3[${flag}${index}]/accessory_designation_name"   label="附件名称"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list3/accessory_designation_name" />"/>
						</td>
						<td align="center">
						 <input type="text" id="remark[${flag}${index}]" name="accessory/list3[${flag}${index}]/remark_name"   label="备注"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list3/remark_name" />"/>
						</td>
						
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
				<script type="text/javascript">
						showAllDateTag("tabaccessory2");
				</script> 
				</table>
				<table width="98%" align="center">
					<tr><td>
					<input class="button"  name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tabaccessory2',${param.number3},'${param.title3}最多${param.number3}条')){addNewRow('tabaccessory2');showDateTag('tabaccessory2');}try{top.resizeFrame();}catch(e){};">
					<input class="button"  name="cmdMovePrev" type=button value="上移" onclick="movePrev('tabaccessory2','sel_main_psn3')">
					<input class="button"  name="cmdMoveNext" type=button value="下移" onclick="moveNext('tabaccessory2','sel_main_psn3')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tabaccessory2','${param.title3} ',null,null,null,3);countTableInt('tabaccessory2','sci1_total','11');countTableInt('tabaccessory2','others1_total','12');">
					</td></tr>
</table> 

<br/>
<div class="t_bar">
	${param.title4}
</div>
<table  id="tabaccessory3" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;" >
			
			<thead >
				<tr>
					<th width="10%">选择</th>
					<th width="10%">序号</th>
					<!-- <th width="30%">附件类型</th> -->
					<th width="40%">附件名称</th>
					<th width="40%">备注</th>
				</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none"  align="center">
						<td align="center">
							<input type="radio" class="radiobutton" name="sel_main_psn4"  >
						</td>
						<td align="center">
							<span name="accessory|list4[0]@seq_no" >[index]</span> 
						</td>
						<!-- <td align="center">
							<input type="text" id="accessory_type[0]" name="accessory|list4[0]|accessory_type_name" label="附件类型"   style="width:80%" class="required"/>
						</td> -->
						<td align="center">						
			          		<input id="accessory_designation[0]" name="accessory|list4[0]|accessory_designation_name" maxlength="100" class=" required" label="附件名称"  style="width:80%"/>
						</td>
						<td align="center">
							<input type="text" id="remark[0]" name="accessory|list4[0]|remark_name" label="备注" maxlength="100" style="width:80%" class="required"/>
						</td>
						
					</tr>
					 <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/accessory/list4" var="list4">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>
							<input type="radio" class="radiobutton" name="sel_main_psn4"  >
						</td>
						<td align="center">
							<span   name="accessory/list4[${flag}${index}]@seq_no" >${index+1}</span>
						</td>
						<%-- <td align="center">
						   <input type="text" id="accessory_type[${flag}${index}]" name="accessory/list4[${flag}${index}]/accessory_type_name"  label="附件类型"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list4/accessory_type_name" />"/>
						</td> --%>
						<td align="center">
						   <input type="text" id="accessory_designation[${flag}${index}]" name="accessory/list4[${flag}${index}]/accessory_designation_name"   label="附件名称"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list4/accessory_designation_name" />"/>
						</td>
						<td align="center">
						 <input type="text" id="remark[${flag}${index}]" name="accessory/list4[${flag}${index}]/remark_name"   label="备注"   style="width:80%" maxlength="100"  class="required" value="<x:out select="$list4/remark_name" />"/>
						</td>
						
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
				<script type="text/javascript">
						showAllDateTag("tabaccessory3");
				</script> 
				</table>
				<table width="98%" align="center">
					<tr><td>
					<input class="button"  name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tabaccessory3',${param.number4},'${param.title4}最多${param.number4}条')){addNewRow('tabaccessory3');showDateTag('tabaccessory3');}try{top.resizeFrame();}catch(e){};">
					<input class="button"  name="cmdMovePrev" type=button value="上移" onclick="movePrev('tabaccessory3','sel_main_psn4')">
					<input class="button"  name="cmdMoveNext" type=button value="下移" onclick="moveNext('tabaccessory3','sel_main_psn4')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tabaccessory3','${param.title4} ',null,null,null,4);countTableInt('tabaccessory3','sci1_total','11');countTableInt('tabaccessory3','others1_total','12');">
					</td></tr>
</table> 
<br/>
<div class="t_bar">本申请所附材料清单</div>
<table  border="0" cellspacing="0"
	cellpadding="0" class="table01 t_css"
	style="*border-bottom: #a1c0dc 1px solid;">
		<tr>
			<c:choose>
				<c:when test="${status==10}">
					<c:set var="colspanVar" scope="page">7</c:set>
					<c:set var="widthVar1" scope="page">7</c:set>
					<c:set var="widthVar2" scope="page">30</c:set>
					<c:set var="widthVar3" scope="page">7</c:set>
					<c:set var="widthVar4" scope="page">25</c:set>
					<c:set var="widthVar5" scope="page">10</c:set>
				</c:when>
				<c:otherwise>
					<c:set var="colspanVar" scope="page">8</c:set>
					<c:set var="widthVar1" scope="page">8</c:set>
					<c:set var="widthVar2" scope="page">50</c:set>
					<c:set var="widthVar3" scope="page">10</c:set>
					<c:set var="widthVar4" scope="page">25</c:set>
					<c:set var="widthVar5" scope="page">10</c:set>
				</c:otherwise>
			</c:choose>
			<td colspan="${colspanVar}"><strong>注意事项：</strong><br />
				1.下表附件，请按照附件文件的要求，每条记录以一个文件形式上传，如果有多个文件则请先合并为一个文件后再上传。<br>
				2.每个附件材料的复印件或者原件，以彩色扫描或者拍照的形式，确保足够清晰、可辨，否则将影响单位信息的审核。<br>
			</td>
		</tr>
		</table>
<table id="prpContent_upload" label="附件" border="0" cellspacing="0"
	cellpadding="0" class="table01 t_css"
	style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		
		<tr>
			<th width="${widthVar1}%">序号</th>
			<th width="${widthVar2}%">附件名称</th>
			<th width="${widthVar3}%">是否必备材料</th>
			<th width="10%"
				<c:if test="${status!=10}">style="display:none"</c:if>>是否符合条件</th>
			<th nowrap width="23%"
				<c:if test="${status!=10}">style="display:none"</c:if>>上次上传记录</th>
			<th width="${widthVar4}%">下载</th>
			<th width="${widthVar5}%">操作</th>
		</tr>
	</thead>
	<tbody>
		<cpt:prpAttach formCode="${fbl.formCode}" grantCode="${grant_code}" natureValue="${nature_value}"
			status="${status}" xmlData="${xmlstr}"></cpt:prpAttach>
	</tbody>
</table>
<br />
<table>
<tr>
	<td><cpt:helpTips key="attach_info" id="tipsId"></cpt:helpTips><br>
	</td>
<tr>
	</table>
	<script type="text/javascript">
		 function addnum(){
			 var Num1=$("#tabaccessory tr").length-2;
			 var Num2=$("#tabaccessory1 tr").length-2;
			 var Num3=$("#tabaccessory2 tr").length-2;
			 var Num4=$("#tabaccessory3 tr").length-2;
			var indexAll=parseInt(Num1)+parseInt(Num2)+parseInt(Num3)+parseInt(Num4);
			return parseInt(indexAll);
			
		}
</script>
		